#ifndef METAPARSER_H
#define METAPARSER_H
#include <QString>
#include <QJsonObject>
#include <QJsonArray>

class MetaParser
{
public:
    MetaParser(QString metaPath);
    MetaParser();
    void setMetaPath(QString metaPath);
    QString getMetaPath();
    void loadMetadata();
    void parseMetadata();
    QJsonValue parseMetaObj(QString obj, QString key);
    void getAttrObj();
    QString toString(QJsonValue val);

    QJsonValue name, creator, instruments, comments, createDate, location, type, format,
    origin, setComments;
    QJsonArray history;
    QJsonObject *newAttr;
//    QMap<QString, QList<QString>> history;


private:
    QString metaPath;
    QString metaContent;
    QJsonObject metaObj;
    QJsonObject setsObj;

};

#endif // METAPARSER_H
